#_*_ coding utf-8 _*_
# FILENAME：mainUI.py
# DESCRIPTION: 主界面UI
# AUTH: Jarvis
# DATE: 2022-5-23
import os

from PyQt5 import QtCore, QtGui, QtWidgets
import qtawesome as qta

from utils import assetsUtils


class MainUI(object):

    path = assetsUtils.resource_path(os.path.dirname(__file__))

    def setupUi(self, MainWindow):
        # 图标
        icon_path = assetsUtils.get_ico()
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(icon_path), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)

        # 设置主窗体
        MainWindow.setObjectName("MainWindow")
        # MainWindow.setFixedSize(900, 700)  # 窗体尺寸
        MainWindow.setMinimumSize(900, 700)
        # 创建窗口主部件
        self.main_widget = QtWidgets.QWidget()
        self.main_layout = QtWidgets.QGridLayout()  # 创建主部件的网格布局

        self.main_layout.setSpacing(0)
        self.main_widget.setLayout(self.main_layout)  # 设置窗口主部件布局为网格布局

        # 创建左侧布局
        self.left_widget = QtWidgets.QWidget()
        self.left_widget.setObjectName("left_widget")
        self.left_widget.setStyleSheet('''
          QWidget#left_widget{
            background:gray;
            border-top:1px solid white;
            border-bottom:1px solid white;
            border-left:1px solid white;
            border-top-left-radius:10px;
            border-bottom-left-radius:10px;
            }
          QPushButton{border:none;color:white;}
          QPushButton#left_label{
            border:none;
            border-bottom:1px solid white;
            font-size:18px;
            font-weight:700;
            font-family: "Sans-serif", "Helvetica Neue", Helvetica, Arial, sans-serif;
          }
          QPushButton#left_button:hover{border-left:4px solid white;font-weight:700;}
          QPushButton#left_close:hover{font-weight:700; font-size: 28px}
        ''')
        self.left_layout = QtWidgets.QGridLayout()  # 创建左侧部件的网格布局层
        self.left_widget.setLayout(self.left_layout)  # 设置左侧部件布局为网格

        # 创建右侧部件
        self.right_widget = QtWidgets.QWidget()
        self.right_widget.setObjectName('right_widget')
        self.right_widget.setStyleSheet('''
          QWidget#right_widget{
            color:#232C51;
            background:white;
            border-top:1px solid darkGray;
            border-bottom:1px solid darkGray;
            border-right:1px solid darkGray;
            border-top-right-radius:10px;
            border-bottom-right-radius:10px;
          }
          QLabel#right_lable{
            border:none;
            font-size:16px;
            font-weight:700;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
          }
        ''')
        self.right_layout = QtWidgets.QHBoxLayout()
        self.right_widget.setLayout(self.right_layout)  # 设置右侧部件布局为网格

        # 左侧菜单栏
        self._left_menu()
        # 右侧
        self._right_main()

        # 布局
        self.main_layout.addWidget(self.left_widget, 0, 0, 12, 2)  # 左侧部件在第0行第0列，占8行3列
        self.main_layout.addWidget(self.right_widget, 0, 2, 12, 10)  # 右侧部件在第0行第3列，占8行9列
        MainWindow.setCentralWidget(self.main_widget)  # 设置窗口主部件
        # MainWindow.setWindowOpacity(0.9)  # 设置窗口透明度
        MainWindow.setAttribute(QtCore.Qt.WA_TranslucentBackground)  # 设置窗口背景透明
        # MainWindow.setWindowFlag(QtCore.Qt.FramelessWindowHint)  # 隐藏边框

    # 左侧菜单栏
    def _left_menu(self):
        # 创建对象
        self.left_close = QtWidgets.QPushButton("")  # 关闭按钮
        self.left_close.setObjectName('left_close')
        self.left_close.setIcon(qta.icon('fa.sign-out', color='white'))  # 设置图标
        self.left_close.setIconSize(QtCore.QSize(24, 24))

        self.left_label_1 = QtWidgets.QPushButton("动态线路规划系统")
        self.left_label_1.setObjectName('left_label')

        self.left_button_all = QtWidgets.QPushButton("全部功能")
        self.left_button_all.setObjectName('left_button')
        self.left_button_all.setIcon(qta.icon('ei.th-list', color='white'))  # 设置图标

        self.left_button_1 = QtWidgets.QPushButton("需求计划")
        self.left_button_1.setObjectName('left_button')
        self.left_button_1.setIcon(qta.icon('fa.pencil-square-o', color='white'))  # 设置图标

        self.left_button_2 = QtWidgets.QPushButton("排单计划")
        self.left_button_2.setObjectName('left_button')
        self.left_button_2.setIcon(qta.icon('fa.list-alt', color='white'))  # 设置图标

        self.left_button_3 = QtWidgets.QPushButton("基础数据")
        self.left_button_3.setObjectName('left_button')
        self.left_button_3.setIcon(qta.icon('fa.wrench', color='white'))  # 设置图标

        self.left_button_4 = QtWidgets.QPushButton("运算参数")
        self.left_button_4.setObjectName('left_button')
        self.left_button_4.setIcon(qta.icon('fa.vcard-o', color='white'))  # 设置图标

        self.left_button_5 = QtWidgets.QPushButton("参数设置")
        self.left_button_5.setObjectName('left_button')
        self.left_button_5.setIcon(qta.icon('fa.cogs', color='white'))  # 设置图标

        self.left_button_6 = QtWidgets.QPushButton("")
        self.left_button_7 = QtWidgets.QPushButton("")
        self.left_button_8 = QtWidgets.QPushButton("")
        self.left_button_9 = QtWidgets.QPushButton("")
        self.left_xxx = QtWidgets.QPushButton(" ")
        # 添加到left_layout中
        self.left_layout.addWidget(self.left_label_1, 0, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_all, 1, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_3, 2, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_4, 3, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_1, 4, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_2, 5, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_5, 6, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_6, 7, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_7, 9, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_8, 10, 0, 1, 3)
        self.left_layout.addWidget(self.left_button_9, 11, 0, 1, 3)
        self.left_layout.addWidget(self.left_close, 12, 0, 1, 3)

        # 右侧工作区
    def _right_main(self):
        # 创建一个滚动条
        self.right_scroll = QtWidgets.QScrollArea()
        self.right_content_widget = QtWidgets.QWidget()
        self.right_scroll.setStyleSheet('''
                                  QWidget#right_content_widget{
                                    color:#232C51;
                                    background:white;
                                  }
                                ''')
        self.right_content_layout = QtWidgets.QVBoxLayout()

        # 基础数据
        self.right_parts_label = QtWidgets.QLabel("基础数据")
        self.right_parts_label.setObjectName('right_lable_parts')
        self.right_content_layout.addWidget(self.right_parts_label)
        self._right_parts_layout()
        # 运算参数
        self.right_suppliers_label = QtWidgets.QLabel("运算参数")
        self.right_suppliers_label.setObjectName('right_lable_suppliers')
        self.right_content_layout.addWidget(self.right_suppliers_label)
        self._right_suppliers_layout()

        # 需求管理
        self.right_require_label = QtWidgets.QLabel("需求计划")
        self.right_require_label.setObjectName('right_lable_require')
        self.right_content_layout.addWidget(self.right_require_label)
        self._right_require_layout()
        # 排单管理
        self.right_order_label = QtWidgets.QLabel("排单计划")
        self.right_order_label.setObjectName('right_lable_order')
        self.right_content_layout.addWidget(self.right_order_label)
        self._right_order_layout()

        # 参数设置
        self.right_config_label = QtWidgets.QLabel("参数设置")
        self.right_config_label.setObjectName('right_config_base')
        self.right_content_layout.addWidget(self.right_config_label)
        self._right_config_layout()
        # 占位组件
        self.right_label_1 = QtWidgets.QLabel("")
        self.right_label_1.setObjectName('right_label_1')
        self.right_content_layout.addWidget(self.right_label_1)
        self._right_layout_1()

        self.right_label_2 = QtWidgets.QLabel("")
        self.right_label_2.setObjectName('right_label_2')
        self.right_content_layout.addWidget(self.right_label_2)
        self._right_layout_2()

        self.right_label_3 = QtWidgets.QLabel("")
        self.right_label_3.setObjectName('right_label_3')
        self.right_content_layout.addWidget(self.right_label_3)
        self._right_layout_3()

        self.right_label_4 = QtWidgets.QLabel("")
        self.right_label_4.setObjectName('right_label_1')
        self.right_content_layout.addWidget(self.right_label_4)
        self._right_layout_4()
        # 隐藏占位组件
        self.right_label_1.setHidden(1)
        self.right_label_2.setHidden(1)
        self.right_label_3.setHidden(1)
        self.right_label_4.setHidden(1)
        self.right_widget_1.setHidden(1)
        self.right_widget_2.setHidden(1)
        self.right_widget_3.setHidden(1)
        self.right_widget_4.setHidden(1)
        #
        self.right_content_widget.setLayout(self.right_content_layout)
        self.right_scroll.setMinimumSize(400, 400)
        self.right_scroll.setWidget(self.right_content_widget)
        self.right_layout.addWidget(self.right_scroll)


    # 需求管理
    def _right_require_layout(self):
        self.right_require_widget = QtWidgets.QWidget()  # 需求管理部件
        self.right_require_layout = QtWidgets.QHBoxLayout()  # 需求管理网格布局
        self.right_require_widget.setLayout(self.right_require_layout)

        # self.require_button_1 = QtWidgets.QToolButton()
        # self.require_button_1.setText("Bom管理")  # 设置按钮文本
        # self.require_button_1.setIcon(QtGui.QIcon(self.path + '/assets/images/bom.png'))  # 设置按钮图标
        # self.require_button_1.setIconSize(QtCore.QSize(60, 40))  # 设置图标大小
        # self.require_button_1.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)  # 设置按钮形式为上图下文

        self.require_button_2 = QtWidgets.QToolButton()
        self.require_button_2.setText("生产队列管理")
        self.require_button_2.setIcon(QtGui.QIcon(self.path + '/assets/images/loading_require.png'))
        self.require_button_2.setIconSize(QtCore.QSize(60, 40))
        self.require_button_2.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        # self.require_button_3 = QtWidgets.QToolButton()
        # self.require_button_3.setText("生产速度管理")
        # self.require_button_3.setIcon(QtGui.QIcon(self.path + '/assets/images/order_config.png'))
        # self.require_button_3.setIconSize(QtCore.QSize(60, 40))
        # self.require_button_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.require_button_4 = QtWidgets.QToolButton()
        self.require_button_4.setText("零件需求")
        self.require_button_4.setIcon(QtGui.QIcon(self.path + '/assets/images/parts_summary.png'))
        self.require_button_4.setIconSize(QtCore.QSize(60, 40))
        self.require_button_4.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.require_button_5 = QtWidgets.QToolButton()
        self.require_button_5.setText("零件汇总")
        self.require_button_5.setIcon(QtGui.QIcon(self.path + '/assets/images/parts_summary.png'))
        self.require_button_5.setIconSize(QtCore.QSize(60, 40))
        self.require_button_5.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.right_require_layout.addWidget(self.require_button_2, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_require_layout.addWidget(self.require_button_4, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_require_layout.addWidget(self.require_button_5, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        # self.right_require_layout.addWidget(self.require_button_1, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        # self.right_require_layout.addWidget(self.require_button_3, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_require_layout.addStretch(1)

        self.right_content_layout.addWidget(self.right_require_widget)

    # 排单管理
    def _right_order_layout(self):
        self.right_order_widget = QtWidgets.QWidget()  # 需求管理部件
        self.right_order_layout = QtWidgets.QHBoxLayout()  # 需求管理网格布局
        self.right_order_widget.setLayout(self.right_order_layout)

        self.order_button_1 = QtWidgets.QToolButton()
        self.order_button_1.setText("排单管理")  # 设置按钮文本
        self.order_button_1.setIcon(QtGui.QIcon(self.path + '/assets/images/order_plan.png'))  # 设置按钮图标
        self.order_button_1.setIconSize(QtCore.QSize(60, 40))  # 设置图标大小
        self.order_button_1.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)  # 设置按钮形式为上图下文

        self.parts_button_3 = QtWidgets.QToolButton()
        self.parts_button_3.setText("零件库存管理")
        self.parts_button_3.setIcon(QtGui.QIcon(self.path + '/assets/images/inventory.png'))
        self.parts_button_3.setIconSize(QtCore.QSize(60, 40))
        self.parts_button_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        # self.order_button_2 = QtWidgets.QToolButton()
        # self.order_button_2.setText("排单计划设置")
        # self.order_button_2.setIcon(QtGui.QIcon('./assets/images/order_config.png'))
        # self.order_button_2.setIconSize(QtCore.QSize(60, 40))
        # self.order_button_2.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.right_order_layout.addWidget(self.order_button_1, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_order_layout.addWidget(self.parts_button_3, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_order_layout.addStretch(1)
        self.right_content_layout.addWidget(self.right_order_widget)

    # 基础数据
    def _right_parts_layout(self):
        self.right_parts_widget = QtWidgets.QWidget()  # 基础数据部件
        self.right_parts_layout = QtWidgets.QHBoxLayout()  # 基础数据网格布局
        self.right_parts_widget.setLayout(self.right_parts_layout)

        self.parts_button_1 = QtWidgets.QToolButton()
        self.parts_button_1.setText("零件管理")  # 设置按钮文本
        self.parts_button_1.setIcon(QtGui.QIcon(self.path + '/assets/images/parts.png'))  # 设置按钮图标
        self.parts_button_1.setIconSize(QtCore.QSize(60, 40))  # 设置图标大小
        self.parts_button_1.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)  # 设置按钮形式为上图下文

        self.parts_button_2 = QtWidgets.QToolButton()
        self.parts_button_2.setText("零件装配延误时间管理")
        self.parts_button_2.setIcon(QtGui.QIcon(self.path + '/assets/images/delay_time.png'))
        self.parts_button_2.setIconSize(QtCore.QSize(60, 40))
        self.parts_button_2.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        # self.parts_button_3 = QtWidgets.QToolButton()
        # self.parts_button_3.setText("零件库存管理")
        # self.parts_button_3.setIcon(QtGui.QIcon(self.path + '/assets/images/inventory.png'))
        # self.parts_button_3.setIconSize(QtCore.QSize(60, 40))
        # self.parts_button_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.require_button_1 = QtWidgets.QToolButton()
        self.require_button_1.setText("Bom管理")  # 设置按钮文本
        self.require_button_1.setIcon(QtGui.QIcon(self.path + '/assets/images/bom.png'))  # 设置按钮图标
        self.require_button_1.setIconSize(QtCore.QSize(60, 40))  # 设置图标大小
        self.require_button_1.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)  # 设置按钮形式为上图下文

        self.require_button_3 = QtWidgets.QToolButton()
        self.require_button_3.setText("生产速度管理")
        self.require_button_3.setIcon(QtGui.QIcon(self.path + '/assets/images/order_config.png'))
        self.require_button_3.setIconSize(QtCore.QSize(60, 40))
        self.require_button_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.right_parts_layout.addWidget(self.require_button_1, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_parts_layout.addWidget(self.parts_button_1, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_parts_layout.addWidget(self.parts_button_2, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        # self.right_parts_layout.addWidget(self.parts_button_3, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_parts_layout.addWidget(self.require_button_3, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_parts_layout.addStretch(1)
        self.right_content_layout.addWidget(self.right_parts_widget)

    # 供应商信息管理
    def _right_suppliers_layout(self):
        self.right_suppliers_widget = QtWidgets.QWidget()  # 基础数据部件
        self.right_suppliers_layout = QtWidgets.QHBoxLayout()  # 基础数据网格布局
        self.right_suppliers_widget.setLayout(self.right_suppliers_layout)

        self.suppliers_button_1 = QtWidgets.QToolButton()
        self.suppliers_button_1.setText("承运商管理")  # 设置按钮文本
        self.suppliers_button_1.setIcon(QtGui.QIcon(self.path + '/assets/images/carrier.png'))  # 设置按钮图标
        self.suppliers_button_1.setIconSize(QtCore.QSize(60, 40))  # 设置图标大小
        self.suppliers_button_1.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)  # 设置按钮形式为上图下文

        # self.suppliers_button_2 = QtWidgets.QToolButton()
        # self.suppliers_button_2.setText("承运商信息")
        # self.suppliers_button_2.setIcon(QtGui.QIcon('./assets/images/carrier.png'))
        # self.suppliers_button_2.setIconSize(QtCore.QSize(60, 40))
        # self.suppliers_button_2.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.suppliers_button_2 = QtWidgets.QToolButton()
        self.suppliers_button_2.setText("厂内运行时间")
        self.suppliers_button_2.setIcon(QtGui.QIcon(self.path + '/assets/images/trans_time.png'))
        self.suppliers_button_2.setIconSize(QtCore.QSize(60, 40))
        self.suppliers_button_2.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.suppliers_button_3 = QtWidgets.QToolButton()
        self.suppliers_button_3.setText("作业时间")
        self.suppliers_button_3.setIcon(QtGui.QIcon(self.path + '/assets/images/work_time.png'))
        self.suppliers_button_3.setIconSize(QtCore.QSize(60, 40))
        self.suppliers_button_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.suppliers_button_4 = QtWidgets.QToolButton()
        self.suppliers_button_4.setText("供应商地址")
        self.suppliers_button_4.setIcon(QtGui.QIcon(self.path + '/assets/images/suppliers_address.png'))
        self.suppliers_button_4.setIconSize(QtCore.QSize(60, 40))
        self.suppliers_button_4.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.suppliers_button_5 = QtWidgets.QToolButton()
        self.suppliers_button_5.setText("供应商距离")
        self.suppliers_button_5.setIcon(QtGui.QIcon(self.path + '/assets/images/suppliers_distance.png'))
        self.suppliers_button_5.setIconSize(QtCore.QSize(60, 40))
        self.suppliers_button_5.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.suppliers_button_6 = QtWidgets.QToolButton()
        self.suppliers_button_6.setText("供应商路程时间")
        self.suppliers_button_6.setIcon(QtGui.QIcon(self.path + '/assets/images/suppliers_duration.png'))
        self.suppliers_button_6.setIconSize(QtCore.QSize(60, 40))
        self.suppliers_button_6.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.right_suppliers_layout.addWidget(self.suppliers_button_1, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_suppliers_layout.addWidget(self.suppliers_button_2, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_suppliers_layout.addWidget(self.suppliers_button_3, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_suppliers_layout.addWidget(self.suppliers_button_4, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_suppliers_layout.addWidget(self.suppliers_button_5, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_suppliers_layout.addWidget(self.suppliers_button_6, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_suppliers_layout.addStretch(1)
        self.right_content_layout.addWidget(self.right_suppliers_widget)
        
    # 参数设置
    def _right_config_layout(self):
        self.right_config_widget = QtWidgets.QWidget()  # 参数设置部件
        self.right_config_layout = QtWidgets.QHBoxLayout()  # 参数设置网格布局
        self.right_config_widget.setLayout(self.right_config_layout)

        self.config_button_1 = QtWidgets.QToolButton()
        self.config_button_1.setText("排班表设置")  # 设置按钮文本
        self.config_button_1.setIcon(QtGui.QIcon(self.path + '/assets/images/order_work.png'))  # 设置按钮图标
        self.config_button_1.setIconSize(QtCore.QSize(60, 40))  # 设置图标大小
        self.config_button_1.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)  # 设置按钮形式为上图下文

        # self.config_button_2 = QtWidgets.QToolButton()
        # self.config_button_2.setText("零件库存设置")
        # self.config_button_2.setIcon(QtGui.QIcon('./assets/images/inventory.png'))
        # self.config_button_2.setIconSize(QtCore.QSize(60, 40))
        # self.config_button_2.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        # self.config_button_3 = QtWidgets.QToolButton()
        # self.config_button_3.setText("零件库存要求")
        # self.config_button_3.setIcon(QtGui.QIcon('./assets/images/inventory.png'))
        # self.config_button_3.setIconSize(QtCore.QSize(60, 40))
        # self.config_button_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        # self.config_button_4 = QtWidgets.QToolButton()
        # self.config_button_4.setText("车内运行时间")
        # self.config_button_4.setIcon(QtGui.QIcon('./assets/images/suppliers_distance.png'))
        # self.config_button_4.setIconSize(QtCore.QSize(60, 40))
        # self.config_button_4.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        # self.config_button_5 = QtWidgets.QToolButton()
        # self.config_button_5.setText("作业时间信息")
        # self.config_button_5.setIcon(QtGui.QIcon('./assets/images/work_time.png'))
        # self.config_button_5.setIconSize(QtCore.QSize(60, 40))
        # self.config_button_5.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)

        self.right_config_layout.addWidget(self.config_button_1, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        # self.right_config_layout.addWidget(self.config_button_2, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        # self.right_config_layout.addWidget(self.config_button_3, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        # self.right_config_layout.addWidget(self.config_button_4, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        # self.right_config_layout.addWidget(self.config_button_5, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_config_layout.addStretch(1)
        self.right_content_layout.addWidget(self.right_config_widget)

    # 占位组件1
    def _right_layout_1(self):
        self.right_widget_1 = QtWidgets.QWidget()  # 部件
        self.right_layout_1 = QtWidgets.QHBoxLayout()  # 网格布局
        self.right_widget_1.setLayout(self.right_layout_1)
        self.require_button_11 = QtWidgets.QWidget()
        self.require_button_11.setFixedSize(60, 66)
        self.right_layout_1.addWidget(self.require_button_11, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_layout_1.addStretch(1)
        self.right_content_layout.addWidget(self.right_widget_1)
    # 占位组件2
    def _right_layout_2(self):
        self.right_widget_2 = QtWidgets.QWidget()  # 部件
        self.right_layout_2 = QtWidgets.QHBoxLayout()  # 网格布局
        self.right_widget_2.setLayout(self.right_layout_2)
        self.require_button_22 = QtWidgets.QWidget()
        self.require_button_22.setFixedSize(60, 66)
        self.right_layout_2.addWidget(self.require_button_22, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_layout_2.addStretch(1)
        self.right_content_layout.addWidget(self.right_widget_2)
    # 占位组件3
    def _right_layout_3(self):
        self.right_widget_3 = QtWidgets.QWidget()  # 部件
        self.right_layout_3 = QtWidgets.QHBoxLayout()  # 网格布局
        self.right_widget_3.setLayout(self.right_layout_3)
        self.require_button_33 = QtWidgets.QWidget()
        self.require_button_33.setFixedSize(60, 66)
        self.right_layout_3.addWidget(self.require_button_33, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_layout_3.addStretch(1)
        self.right_content_layout.addWidget(self.right_widget_3)
    # 占位组件4
    def _right_layout_4(self):
        self.right_widget_4 = QtWidgets.QWidget()  # 部件
        self.right_layout_4 = QtWidgets.QHBoxLayout()  # 网格布局
        self.right_widget_4.setLayout(self.right_layout_4)
        self.require_button_44 = QtWidgets.QWidget()
        self.require_button_44.setFixedSize(60, 66)
        self.right_layout_4.addWidget(self.require_button_44, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
        self.right_layout_4.addStretch(1)
        self.right_content_layout.addWidget(self.right_widget_4)